package cn.edu.nwafu.nic.nucleic_acid_test.dao;
import cn.edu.nwafu.nic.nucleic_acid_test.entities.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.HashMap;


/**
 * @author: SungLee
 * @date: 2018-10-01 17:25
 * @description: 用户mapper接口
 */
@Mapper
public interface UserDao extends BaseMapper<User> {
    @Select("select * from user where userId = #{userId}")
    User findUserByUserid(@Param("userId") String userId);

    @Insert("insert into user (id,userId,pwd) values (#{id},#{userId},#{pwd})")
    boolean insertUsers(@Param("id") String id, @Param("userId") String userId, @Param("pwd") String pwd);

    @Select("select * from user")
    ArrayList<User> listAll();

}

